<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
		<meta charset="utf-8" />
	<link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">实习过程管理</a></li>
    <li><a href="#">学生实习变更</a></li>
   
    </ul>
    </div>
    
    <div class="rightinfo">
    
    <div class="tools">
    <form id="searchForm" class="form-search"
						action="teacher/teacher_page_list.do" method="post">
    	<ul class="seachform1">
    	<c:if test="${userRole <2 }">
    		<li>选择院系：</li>  
    	    <li>
    	    <select name="deptCode" class="chosen-select col-xs-10 col-sm-5" >
						<option value="" > -- 全部 -- </option>
						<c:forEach items="${departmentInfoList}" var="departmentInfo">
							<option value="${departmentInfo.XYDM }" <c:if test="${departmentInfo.XYDM == deptCode }">selected</c:if> >${departmentInfo.XYMC }</option>
						</c:forEach>
					</select>
    	</li>
    	</c:if>
    	<c:if test="${userRole >2 }">
    	<li><input value="${departmentName }" name="BM" type="hidden">${departmentName } </li>
    	</c:if>
		<li><input name="studentName" type="text" class="scinput1" value="${studentName }" placeholder="输入学生姓名" /></li>
		<li><input name="" type="button" id="btnSearch" class="scbtn" value="查询"/></li>  
		<div class="clearfix"></div>
		</ul>	
		 <input type="hidden" name="pageNumber" value="1" />
    	</form>
    	<!--<ul class="toolbar">
        <li class="click"><span><img src="images/t01.png" /></span>添加</li>
        <li class="click"><span><img src="images/t02.png" /></span>修改</li>
        <li><span><img src="images/t03.png" /></span>删除</li>
        <li><span><img src="images/t04.png" /></span>统计</li>
        </ul>
        <ul class="toolbar1">
        <li><span><img src="images/t05.png" /></span>设置</li>
        </ul>
    -->
      </div>
      <table class="tablelist">
    	<thead>
    	<tr>
    	<th>学号</th>
        <th>姓名</th>
        <th>申请日期</th>
		<th>变更前情况</th>
        <th>变更申请情况</th>
       <th>负责教师</th>
       <th>变更处理情况</th>
       <th>操作</th>
      </tr>
        </thead>
        <tbody>
         <c:forEach items="${practiceChangeList}" var="practiceChange"  varStatus="status">
      <tr>
       <td>${practiceChange.studentId}</td>
        <td>${practiceChange.studentName}</td>
        <td>${practiceChange.applyTime}</td>
        <td><c:if test="${practiceChange.currentStatus==0}">在校</c:if>
			<c:if test="${practiceChange.currentStatus==1}">自主创业</c:if>
			<c:if test="${practiceChange.currentStatus==2}">专升本</c:if>
			<c:if test="${practiceChange.currentStatus==3}">自寻企业实习</c:if>
			<c:if test="${practiceChange.currentStatus==4}">学校分配企业</c:if>  - ${practiceChange.currentEnterpriseName}</td>
        <td><c:if test="${practiceChange.toStatus==0}">在校</c:if>
			<c:if test="${practiceChange.toStatus==1}">自主创业</c:if>
			<c:if test="${practiceChange.toStatus==2}">专升本</c:if>
			<c:if test="${practiceChange.toStatus==3}">自寻企业实习</c:if>
			<c:if test="${practiceChange.toStatus==4}">学校分配企业</c:if>  - ${practiceChange.enterpriseName}</td>
         <td>${practiceChange.teacherName}</td>
         <td><c:if test="${practiceChange.checkApprove==0}">未审核</c:if>
         <c:if test="${practiceChange.checkApprove==1}">指导教师未批准</c:if>
         <c:if test="${practiceChange.checkApprove==2}">指导教师已批准</c:if>
         <c:if test="${practiceChange.checkApprove==3}">部门未批准</c:if>
         <c:if test="${practiceChange.checkApprove==4}">部门已批准</c:if></td>
		<td><c:if test="${practiceChange.checkApprove!=0}"><a  onclick="check('${practiceChange.id}');" class="check">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;</c:if>
		<c:if test="${practiceChange.checkApprove==0}"><a  onclick="review('${practiceChange.id}');" class="sh">审核</a>&nbsp;&nbsp;&nbsp;&nbsp;</c:if></td>
		</tr>
		</c:forEach>
      </tbody>
      </table>
    
   <div class="pagin">
    	<%@ include file="page.jsp"%>
    </div>
    </div>
    <script src="js/jquery-1.7.2.js"></script>
    <script src="layer/layer.js"></script>
    <script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	$( "#btnSearch" ).on('click', function(e) {
		$("#searchForm").submit();
	});
	function GoToPage(toPage,totalPage) {
	    if(toPage<=0) return;
	    if(toPage>totalPage) return;
	    $("input[name='pageNumber']").val(toPage);
	    $("#searchForm").submit();
	};
	function closeAll() {
		layer.alert('审核成功!', {
			skin : 'layer-ext-moon'
		}, function() {
			layer.closeAll(); 
			 location.reload();
		}); 
	}
			function review(id) {
						layer.open({
							type : 2,
							closeBtn : 2,
							title : '学生变更审核',
							shadeClose : true,
							shade : 0.8,
							area : [ '650px', '550px' ],
							content : 'practiceChange/practice_change_review.do?id='+ id,
							end: function () {
							      location.reload();
							  }
						});
			}
					function check(id) {
						layer.open({
									type : 2,
									closeBtn : 2,
									title : '学生变更情况',
									shadeClose : true,
									shade : 0.8,
									area : [ '650px', '460px' ],
									content : 'practiceChange/practice_change_check.do?id='
											+ id //iframe的url
								});
					}
				</script>
</body>

</html>
